<!DOCTYPE html>
<html>
<head>
    <title>微信扫码支付</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style type=text/css>
        body {
            text-align: center
        }
    </style>
</head>
<body>
<div style="margin-top: 26px;">
    <div>微信扫一扫支付</div>
    <img src="http://paysdk.weixin.qq.com/example/qrcode.php?data=<?php echo urlencode($url2);?>"
         style="width:200px;height:200px;"/>
</div>
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
    var index = parent.layer.getFrameIndex(window.name);
    var timer1 = setInterval(function(){
        $.getJSON("{:U('Api/Portal/alipayPayConfirm')}"+"?tradeNO={$out_trade_no}",function(ret){
            switch (ret.retCode){
                case 0:
                    clearInterval(timer1);
                    parent.layer.confirm('支付成功，是否需要继续发单？', {
                        btn: ['是','查看订单'] //按钮
                    }, function(){
                        parent.layer.msg('您可以继续发单！');
                        parent.layer.close(index);
                    }, function(){
                        parent.layer.msg('抱歉，该功能正在开发！');
                        parent.layer.close(index);
                    })
                    break;
                case 1:

                    break;
            }
        })
    },500);
</script>
</body>
</html>
